package NGUYENHUUDUC.OOP.EXCLASS2;

public class MODELS {
	public String Internet(int start,int end){
		String out = "";
		if(start>end){
			out="Moi nhap lai gio bat dau,gio bat dau lon hon gio ket thuc!";
		}else{
			int use=end-start;
			if((start>7 && start<17) && (end>7 && end<17)){
				if(use>6){
					double money = use*60*200*(1-0.1);
					out="So tien la:"+money+"dong";
				}else{
					out="So tien la:"+use*60*200;
				}
			}else if((start>17 && start<24)&& (end>17 && end<24)){
				if(use>4){
					out="So tien la:"+use*60*150*(1-0.12);
				}else{
					out="So tien la:"+use*60*150;
				}
			}else if((start>24 && start<7)&& (end>24 && end<7)){
				if(use>5){
					out="So tien la:"+use*60*100*(1-0.15);
				}else{
					out="So tien la:"+use*60*100;
				}
			}
		}
		return out;
	}
}
